<?php
//PHP-MSN-Project demo Bot

define ('VERSION',      '0.1');
define ('DEBUG_LOG',    dirname($_SERVER['argv'][0]).DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR.'debug.log');

declare (ticks = 1);
error_reporting(E_ALL);

require_once 'includes/class.msn.php';
require_once 'includes/class.msn.switchboard.php';
//require_once 'includes/class.console.php';
require_once 'includes/class.msn.helper.php';
require_once 'includes/class.msn.connection.php';
require_once 'includes/class.msn.protocol.php';
require_once 'config.php';

$msn = new MSN();
var_dump($msn->connect($config['account'], $config['password']));
$msn->doLoop(array('initFunction'=>'connectionInit', 'loopFunction'=>'loopFunction', 'switchboardLoop'=>'switchboardLoop'));


function connectionInit( $obj ) {
    $obj->helper->setNick('G-Lex');
    $obj->helper->setPSM('G-Lex teszt robot :)');
    $obj->helper->setStatus(msnHelper::STATUS_ONLINE);
    $obj->helper->log('--> FN INIT');
} // end func

function loopFunction( $obj ) {
//    $obj->helper->log('--> FN LOOP');
} // end func

function switchboardLoop( $obj ) {
    $obj->helper->log('--> FN SWLOOP');
} // end func

?>